load("@rules_cc//cc:defs.bzl", "cc_test")

COMMON_COPTS = select({
    "@platforms//os:windows": [
        "/W4",
        "/bigobj",
    ],
    "//conditions:default": [
        "-pedantic",
        "-Wall",
        "-Wstrict-aliasing",
        "-fstrict-aliasing",
        "-Wno-long-long",
    ],
})

test_sources = glob(["*.cpp"])

test_headers = glob(["*.hpp"])

[
    cc_test(
        name = src.replace(".cpp", ""),
        srcs = [src] + test_headers,
        copts = COMMON_COPTS,
        deps = [
            "@boost.core",
            "@boost.polygon",
            "@boost.random",
        ],
    )
    for src in test_sources
]
